package com.wb.proxy.jdk;

import com.wb.proxy.jdk.service.impl.StudentServiceImpl;
import sun.misc.ProxyGenerator;

import java.io.File;
import java.io.FileOutputStream;

/**
 * @author 魏彪
 */
public class TestStudent {

    public static void main(String[] args) throws Exception {
        String path = "/Users/weibiao/IdeaProjects/mybatis-source/src/";
        byte[] $Proxy1s = ProxyGenerator.generateProxyClass("$Proxy1", StudentServiceImpl.class.getInterfaces());
        FileOutputStream outputStream = new FileOutputStream(new File(path + "$Proxy1s.class"));
        outputStream.write($Proxy1s);
        outputStream.flush();
        outputStream.close();
    }
}
